﻿@model IEnumerable<SiteManager.Models.sites>
@using SiteManager.Core.Helper
@{
    ViewBag.Title = "站点列表";
}
<div class="widget add-new-widget increase">
	<a href="/Manager/Sites/Create" rel="tooltip" title="点击添加一个新的站点">
		<span>新增</span>
		<strong>新增新站点</strong>
	</a>
</div>

<table class="datatable">
    <thead>
	    <tr>
		    <th>站点名称</th>
		    <th>版权所属</th>
		    <th>使用语言</th>
		    <th>状态</th>
		    <th>创建时间</th>
		    <th>过期时间</th>
		    <th>&nbsp;</th>
	    </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
	    <tr class="gradeA">
		    <th>@item.Name</th>
		    <th>@item.PowerBy</th>
		    <th>@item.Language</th>
		    <th>@item.Status</th>
		    <th>@StringHelper.FormatDateTime(item.CreateTime)</th>
		    <th>@StringHelper.FormatDateTime(item.ExpirTime)</th>
		    <th>
                @Html.ActionLink("查看", "Edit", new { id = item.SiteID }, new { @class = "button-link blue", rel = "tooltip", title = "点击查看站点详细信息" })
		        @Html.ActionLink("修改", "Edit", new { id = item.SiteID }, new { @class = "button-link green", rel = "tooltip", title = "点击修改" })
		        @Html.ActionLink("删除", "Delete", new { id = item.SiteID }, new { @class = "button-link gray", rel = "tooltip", title = "点击删除", onclick = "javascript: return dialog('删除之后，数据将无法恢复，确认删除 “" + item.Name + "” 吗？', {'confirm':true, 'url':this.href, 'data': {'id':" + item.SiteID + "}});" })
		        @Html.ActionLink("基本配置", "Settings", new { id = item.SiteID }, new { @class = "button-link", rel = "tooltip", title = "配置该站点" })
            </th>
	    </tr>
        }
    </tbody>
</table>